package com.blank.service.Impl;

import com.blank.dao.BookDao;
import com.blank.dao.Impl.BookDaoImpl;
import com.blank.pojo.bo.Book;
import com.blank.service.BookService;

import java.sql.SQLException;
import java.util.List;

/**
 * @author BLANK
 * @date 2020/11/16
 */
public class BookServiceImpl implements BookService {
    BookDao bookDao =new BookDaoImpl();
    @Override
    public List<Book> selectAllBook() throws SQLException {
        return bookDao.selectAllBook();
    }

    @Override
    public boolean borrowBook(int id, String username) throws SQLException {
        return bookDao.borrowBook(id,username);
    }

    @Override
    public List<Book> selectBookPage(int pageNum, int nums) throws SQLException {
        return bookDao.selectBookPage(pageNum,nums);
    }

    @Override
    public int countBookList() throws SQLException {
        return bookDao.countBookList();
    }
}
